package recomendacaoservidor.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @author Marcelo, Jefferson
 * Classe estatica que abre conexao com o banco de dados
 */
public class Conexao {
    
    private Conexao(){}
    
    public static Connection getConexao() throws Exception, SQLException{
        Class.forName("org.postgresql.Driver");
        Connection conexao = null;
        String url = "jdbc:postgresql://127.0.0.1:5432/recomendacaoservidor";
        String user = "postgres";
        String pass = "jefferson";            
        conexao = DriverManager.getConnection(url,user,pass);
        return conexao;
    }
}
